Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auton delay #74

Closed
wants to merge 1 commit into from
Closed

Auton delay #74

wants to merge 1 commit into from

Conversation

Griffin9881
Copy link
Contributor

Pull Request


Issue Number

Closes #73

Comments

i made a delay for auton so you can pick a number in the dashboard and it will wait that many seconds before auton

@@ -21,13 +23,14 @@
public class Robot extends TimedRobot {
// Singleton Instances
private AutonSelector autonSelector = AutonSelector.getInstance();
private DelaySelector delaySelector = DelaySelector.getInstance();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since delay selection is really part of auton selection, it doesn't need its own class, it can be build as a second item inside of auton selector

// if (DriverStation.isFMSAttached()) {
// vision.startRecording();
// }

if (autonomousCommand != null) {
driveTrain.setDrivingIdleMode(SwerveModuleConstants.kAutoDrivingMotorIdleMode);
Timer.delay(autonomousDelay);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still believe that adding a WaitCommand into the sequential command group inside of the Auton abstract class is a better implementation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just thought this way would be nicer because if someone wanted to make a new auton they wouldn't have to remeber to put a waitCommand at the top of the class especially if it was during a comp and it just slipped their minds

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you put this in the auton class that all autons extend from then it won’t be an issue

src/main/java/frc/robot/autons/Auton.java Outdated Show resolved Hide resolved
}

private DelaySelector() {
this.delayChooser = Dashboard.getInstance().getDelayChooser();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of using a sendable chooser with a bunch of options, It would be a lot less code and a lot easier to make a selection if you just do Shuffleboard.getDouble() and then clamp it between 0 and 10.5.
That way you could do any fractional number of seconds between min and max and there isn't a long list of cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do i do that ive been trying to do it like a genearic entry but it is not allowing me to go from GenericEntry to Double

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@Griffin9881 Griffin9881 Feb 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want me to make a new tab
i found that link but i didnt think i should use it because i didnt know how to use it and put it on drivers tab

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can put it on the drivers tab. Let’s talk about this on Monday

@@ -3,7 +3,7 @@
import edu.wpi.first.wpilibj.PneumaticsModuleType;

public final class PneumaticsConstants {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be deleted along with compressor

@@ -20,7 +20,7 @@ public class Scoring extends PIDSubsystem {
private final CANSparkMax rightScoringElevatorMotor = new CANSparkMax(
ScoringConstants.rightScoringElevatorMotorPort, MotorType.kBrushless);
private final CANSparkMax rollerMotor = new CANSparkMax(
ScoringConstants.rollerMotorPort, MotorType.kBrushless);
ScoringConstants.rollerMotorPort, MotorType.kBrushed);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not commit any brushed motors. The chances of someone forgetting these and deploying to the comp bot and burning out neos is too high. Please set all instances of kBrushed back to Brushless before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make delay for auton
2 participants